<template>
  <!--所有选手-->
  <div class="all-player">
    <div class="">
      <div class="box">
        <div class="title">- 丽人秀 -</div>
        <ul>
          <li @click='toWhere(item.option_id)' :data-id="item.option_id" v-for="(item,i) in allPlayer" :key="i">
            <div class="player-img">
              <img :src="item.img"></div>
            <div class="player-msg" v-text="item.self_no+ '.'+ item.name">
            </div>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    props: [
      'allPlayer'
    ],
    methods: {
      // 要跳转到哪里
      toWhere(id) {
        if (this.option_id == id) { //1
          this.$router.push({path: '/detailsMe', query: {id: id}})
        } else {
          this.$router.push({path: '/details', query: {id: id}})
        }
      }
    }
  }
</script>
<style lang="less" scoped>
  @col: #ed007c;
  // 所有选手
  .all-player {
    padding: 0 15px;
    background: #fff;
    font-size: 15px;
    color: #666;
    .box {
      .title {
        text-align: center;
        color: @col;
        height: 45px;
        line-height: 45px;
      }
      > ul {
        width: 100%;
        display: flex;
        display: -webkit-flex;
        justify-content: space-between;
        -webkit-justify-content: space-between;
        flex-wrap: wrap;
        -webkit-flex-wrap: wrap;
        text-align: center;
        li {
          // 选手图片
          .player-img {
            background: url("../../static/images/bg.png") no-repeat;
            background-size: cover;
            width: 3.413rem;
            height: 3.413rem;
            border-radius: 5px;
            overflow: hidden;
            img {
              display: block;
              width: 100%;
            }
          }
        }
      }
      .player-msg {

        height: 35px;
        line-height: 35px;
        margin-bottom: 10px;
      }
    }
  }
</style>
